﻿<Window x:Class="AppReviewerClient.ShellView"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:cal="http://www.caliburnproject.org"
        xmlns:ribbon="clr-namespace:Microsoft.Windows.Controls.Ribbon;assembly=RibbonControlsLibrary" 
        mc:Ignorable="d"
        WindowStartupLocation="CenterScreen"
        Width="800"
        Height="600"
        Title="Application Reviewer Client"
        >
    <!--
    Height="176"
    WindowStyle="None"
        WindowState="Normal"
        ResizeMode="CanMinimize"-->
    <!--cal:Message.Attach="[Event Activated]=[Action OnInitialized($eventArgs)]"-->

    <Grid Background="White">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="706*" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        <ribbon:Ribbon ScrollViewer.CanContentScroll="False" Title="{Binding Path=SelectedExercise.Title}" >
            <ribbon:RibbonTab Header="Home" Grid.ColumnSpan="1" Grid.RowSpan="2" >
                <ribbon:RibbonGroup Header="Exercises" >
                    <ribbon:RibbonButton Label="Select Exercise" LargeImageSource="Images/exer_selection.png"  x:Name="ShowAvailableExercise" />
                </ribbon:RibbonGroup>
                <ribbon:RibbonGroup IsEnabled="{Binding Path=IsExerciseSelected}" Header="Current Exercise">
                    <ribbon:RibbonButton Label="Start Recording" LargeImageSource="Images/ex_play.png"  x:Name="StartRecording" />
                    <ribbon:RibbonButton Label="Pause Recording" LargeImageSource="Images/ex_pause.png"  x:Name="PauseRecording" />
                    <ribbon:RibbonButton Label="Close Exercise" LargeImageSource="Images/app_close.png"  x:Name="CloseExercise" />
                    <ribbon:RibbonButton Label="Exercise Completed" LargeImageSource="images/quest_complete.png"   x:Name="ExerciseCompleted" />
                </ribbon:RibbonGroup>
                <ribbon:RibbonGroup IsEnabled="{Binding Path=IsExerciseSelected}" Header="Recording State">
                    <!--<StackPanel DockPanel.Dock="Right" VerticalAlignment="Top" Orientation="Horizontal">
                        <TextBlock Text="Mode :" ></TextBlock>
                        <TextBlock Text="Webcam "></TextBlock>
                        <Image Source="Images/webcam.png" Height="32"/>
                    </StackPanel>-->
                </ribbon:RibbonGroup>
            </ribbon:RibbonTab>

            <ribbon:RibbonTab Header="Background Activity" >
                <ribbon:RibbonGroup Header="Uploading" >
                    <!--<ribbon:RibbonButton Label="Pause Upload" LargeImageSource="Images/exercise_pause.png"  x:Name="PauseUploading" />
                    <ribbon:RibbonButton Label="Continue Upload" LargeImageSource="Images/exercise_start.png"  x:Name="ContinueUploading" />-->
                    <ribbon:RibbonButton Label="Retry YouTube Upload" LargeImageSource="Images/exercise_start.png"  x:Name="LoginYouTube" />
                    <StackPanel MinWidth="200">
                        <ribbon:RibbonTwoLineText Text="{Binding Path=UploadingQueueText}"/>
                        <ribbon:RibbonTwoLineText Text="{Binding Path=CurrentUploadFileName}"/>
                        <ProgressBar Value="{Binding Path=YouTubeUploader.UploadProgress}" Width="Auto" Height="30"/>
                    </StackPanel>

                </ribbon:RibbonGroup>
                <ribbon:RibbonGroup Header="Encoding" >
                    <StackPanel MinWidth="200">
                        <ribbon:RibbonTwoLineText Text="{Binding Path=EncodingQueueText}"/>
                        <ribbon:RibbonTwoLineText Text="{Binding Path=CurrentEncodingFileName}"/>
                        <ProgressBar Value="{Binding Path=EncodingProgress}" Width="Auto" Height="30"/>
                    </StackPanel>
                    <!--<ribbon:RibbonButton Label="Pause Encoding" LargeImageSource="Images/exercise_pause.png"  x:Name="PauseEncoding" />
                    <ribbon:RibbonButton Label="Continue Encoding" LargeImageSource="Images/exercise_start.png"  x:Name="ContinueEncoding" />-->
                </ribbon:RibbonGroup>
            </ribbon:RibbonTab>
        </ribbon:Ribbon>

        <DockPanel Grid.Row="1" >
            <DockPanel.Resources>
                <Style TargetType="{x:Type StackPanel}">
                    <Setter Property="Orientation" Value="Horizontal"/>
                </Style>
                <Style TargetType="{x:Type Border}">
                    <Setter Property="Margin" Value="4"/>
                    <Setter Property="Padding" Value="3"/>
                    <Setter Property="CornerRadius" Value="10,0,10,0"/>
                    <Setter Property="BorderThickness" Value="2"/>
                    <Setter Property="BorderBrush" Value="CornflowerBlue"/>
                    <Setter Property="DockPanel.Dock" Value="Top"/>
                    <Style.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter Property="Background" Value="LightGreen" />
                        </Trigger>
                    </Style.Triggers>
                </Style>
                <Style TargetType="{x:Type TextBlock}">
                    <Setter Property="FontSize" Value="25"/>
                    <Setter Property="VerticalAlignment" Value="Center"/>
                    <Setter Property="Foreground" Value="DarkBlue"/>
                    <Setter Property="Margin" Value="20,0,0,0"/>
                </Style>
                <Style TargetType="{x:Type TextBlock}" x:Key="Title" >
                    <Setter Property="FontSize" Value="25"/>
                    <Setter Property="VerticalAlignment" Value="Center"/>
                    <Setter Property="Foreground" Value="DarkBlue"/>
                    <Setter Property="Margin" Value="20,0,0,0"/>
                    <Setter Property="FontWeight" Value="ExtraBold"/>
                    <Setter Property="MinWidth" Value="220"/>
                </Style>
            </DockPanel.Resources>
            <Border>
                <DockPanel>
                    <StackPanel>
                        <Image Source="Images/info.png" Height="48"/>
                        <StackPanel Orientation="Horizontal">
                            <TextBlock Text="Title :" Style="{StaticResource ResourceKey=Title}"></TextBlock>
                            <TextBlock Text="{Binding Path=SelectedExercise.Title}"></TextBlock>
                        </StackPanel>
                    </StackPanel>
                </DockPanel>
            </Border>
            <!--<Border>
                <DockPanel>
                    <StackPanel>
                        <Image Source="Images/device_pc.png" Height="48"/>
                        <TextBlock Text="Target Device : " Style="{StaticResource ResourceKey=Title}"></TextBlock>
                        <TextBlock Text="{Binding Path=SelectedExercise.TargetDevice}"></TextBlock>
                    </StackPanel>
                </DockPanel>
            </Border>-->
            <Border>
                <StackPanel Orientation="Horizontal" >
                    <Image Source="Images/reward.png" Height="48"/>
                    <TextBlock Text="Exercise Reward : " Style="{StaticResource ResourceKey=Title}"></TextBlock>
                    <TextBlock Text="{Binding Path=SelectedExercise.Reward}"></TextBlock>
                </StackPanel>
            </Border>
            <Border>
                <StackPanel Orientation="Horizontal" >
                    <Image Source="Images/exercise_body.png" Height="48" Width="48"/>
                    <StackPanel Orientation="Vertical">
                        <TextBlock Text="Exercise : " Style="{StaticResource ResourceKey=Title}"></TextBlock>
                        <TextBlock VerticalAlignment="Top" Text="{Binding Path=SelectedExercise.Note}"></TextBlock>
                    </StackPanel>
                </StackPanel>
            </Border>

            <DockPanel.Background>
                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                    <GradientStop Color="#FFF6F8A9" Offset="0.936" />
                    <GradientStop Color="#FFFDFFE2" Offset="0.076" />
                    <GradientStop Color="#FFFFFFD4" Offset="0.419" />
                </LinearGradientBrush>
            </DockPanel.Background>
        </DockPanel>
        <StatusBar Grid.Row="2" >
            <StatusBar.ItemsPanel>
                <ItemsPanelTemplate>
                    <Grid>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="*"/>
                        </Grid.RowDefinitions>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*"/>
                            <ColumnDefinition Width="*"/>
                            <ColumnDefinition Width="Auto"/>
                        </Grid.ColumnDefinitions>
                    </Grid>
                </ItemsPanelTemplate>
            </StatusBar.ItemsPanel>
            <StatusBarItem>
                <StackPanel Orientation="Horizontal">
                    <!--<TextBlock Text="Uploading : "/>
                    <TextBlock Text="{Binding Path=CurrentUploadFileName}" Margin="10,0,10,0"/>
                    <ProgressBar Value="{Binding Path=UploadProgress}" Width="80" Height="18"/>
                    <Button ToolTip="Pause Upload" x:Name="PauseUploading">
                        <Image Source="images/pause_mini.gif"/>
                    </Button>
                    <Button ToolTip="Continue Upload" x:Name="ContinueUploading">
                        <Image Source="images/play_mini.gif"/>
                    </Button>-->
                </StackPanel>
            </StatusBarItem>
            <StatusBarItem Grid.Column="1">
                <!--<StackPanel Orientation="Horizontal">
                    <TextBlock Text="Encoding : "/>
                    <TextBlock Text="{Binding Path=CurrentEncodingFileName}" Margin="10,0,10,0"/>
                    <ProgressBar Value="{Binding Path=EncodingProgress}" Width="80" Height="18"/>
                    <Button ToolTip="Pause Encoding" x:Name="PauseEncoding">
                        <Image Source="images/pause_mini.gif"/>
                    </Button>
                    <Button ToolTip="Continue Encoding" x:Name="ContinueEncoding">
                        <Image Source="images/play_mini.gif"/>
                    </Button>
                </StackPanel>-->
                <!---->
            </StatusBarItem>
            <StatusBarItem Grid.Column="2">
                <!--<TextBlock>Set</TextBlock>-->
            </StatusBarItem>
            <StatusBarItem Grid.Column="3" >
                <StackPanel Orientation="Horizontal" >
                    <Button x:Name="LogoffCmd" Content="{Binding Path=BtnLogInText}" Margin="0,0,10,0" />
                    <TextBlock Text="User : " VerticalAlignment="Center"/>
                    <TextBlock Text="{Binding Path=DisplayUsername}" VerticalAlignment="Center"/>
                </StackPanel>
            </StatusBarItem>

        </StatusBar>

    </Grid>
</Window>
<!--<ribbon:RibbonGroup Header="Close" >
    <ribbon:RibbonButton Label="Close Application" LargeImageSource="Images/app_close.png"  Click="Button_Click"  />
</ribbon:RibbonGroup>-->
<!--<Button Click="Button_Click"  Grid.Row="0" Grid.Column="1">
    <Image Source="Images/app_close.png" />
</Button>-->
<!--<Button   x:Name="ShowAvailableExercise"  >
    <StackPanel>
        <Image Source="Images/exercise_available.png" />
        <TextBlock Text="Download Exercise" />
    </StackPanel>
</Button>-->

    
    